<?php 
phpinfo();

// $data = Csv::read('五区.小屋.csv');

// $sqls = [];
// $params = [];
// foreach ($data as $key=>$value) {
//     $sqls[] = 'insert into ass_depot(created, pid, pname, aid, aname, bid, bname, floor, name, size) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
//     $params[] = [time(), $value[0], $value[1], $value[2], $value[3], $value[4], $value[5], $value[6], $value[7], $value[8]];
// }

// Mdb::write(DB['my_main'], $sqls, $params);
// echo '成功'; 

// $unit = Mdb::query(DB['my_main'], 'select * from ass_unit');
// $house = Mdb::query(DB['my_main'], 'select * from ass_house');
// $sqls = [];
// $params = [];
// foreach ($house as $hk=>$hv) {
//     $u = $unit[$hv['uid'] - 1];
//     $sqls[] = 'update ass_house set bid=?, bname=?, uname=? where id=?';
//     $params[] = [$u['bid'], $u['bname'], $u['name'], $hv['id']];
    
// }

// Mdb::write(DB['my_main'], $sqls, $params);
// echo '成功'; 